import {Request} from "./post_request.js"

let base = '/recruitserver/api/v1/';

// export const requestLogin = params => { return axios.post(`${base}login`,params) }; // 登录伪

/*
*上传 (通用上传接口)
*/
export const fileUpload = (_this,params) =>{return Request(_this,`${base}file/upload`,params,'','multipart/form-data')}


export const requestLogin = (_this,params) =>{return Request(_this,`${base}login`,params)}//用户登录
//export const userGet = (_this,params) => {return Request(_this,`${base}user/get`,params)}//用户登录之后获取用户个人信息
export const changPwd = (_this,params) =>{return Request(_this,`${base}change_pwd`,params)}//修改当前登录用户密码

//人员管理子模块
export const userGetRoleConfig = (_this,params) =>{return Request(_this,`${base}user/get_role_config`,params)}//1.获取用户角色配置信息
export const AddUser = (_this,params) =>{return Request(_this,`${base}user/add`,params)}//新增用户
export const changePwd = (_this,params) =>{return Request(_this,`${base}change_pwd`,params)}//用户修改个人登录密码
export const userGetAll = (_this,params) =>{return Request(_this,`${base}user/get_all`,params)}//获取全部用户
export const userGetParent = (_this,params) =>{return Request(_this,`${base}user/get_parent`,params)}//获取某一用户的全部上级用户
export const userAction = (_this,params) =>{return Request(_this,`${base}user/action`,params)}//编辑或删除用户
export const userGetLevels = (_this,params) =>{return Request(_this,`${base}user/get_levels`,params)}//获取用户上下级


//试题库模块管理
export const questionDelete = (_this,params) =>{return Request(_this,`${base}question/delete`,params)}//1、删除题目
export const questionUpdate = (_this,params) =>{return Request(_this,`${base}question/update`,params)}//2、编辑题目
export const questionSearch = (_this,params) =>{return Request(_this,`${base}question/search`,params)}//3、搜索题目
export const paperCreate = (_this,params) =>{return Request(_this,`${base}paper/create`,params)}//4、出卷
export const paperUpdate = (_this,params) =>{return Request(_this,`${base}paper/update`,params)}//5、编辑试卷
export const paperGetall = (_this,params) =>{return Request(_this,`${base}paper/get_all`,params)}//6、获取全部试卷
export const paperDetail = (_this,params) =>{return Request(_this,`${base}paper/detail`,params)}//7、获取试卷详情
export const paperSubmit= (_this,params) =>{return Request(_this,`${base}paper/submit`,params)}//8、交卷
export const paperGetUserAnswer = (_this,params) =>{return Request(_this,`${base}paper/get_user_answer`,params)}//9、查看全部考生答题记录
export const paperJudgeScore = (_this,params) =>{return Request(_this,`${base}paper/judge_score`,params)}//10、判分、批卷
export const paperGetScore = (_this,params) =>{return Request(_this,`${base}paper/get_score`,params)}//11、考生查看答卷
export const statisticsScore = (_this,params) =>{return Request(_this,`${base}statistics/score`,params)}//12、成绩分析
export const statisticsQuestion = (_this,params) =>{return Request(_this,`${base}statistics/question`,params)}//13、试卷单选题分析
export const questionMultiAdd = (_this,params) =>{return Request(_this,`${base}question/multi_add`,params)}//14、批量导入题目
export const paperGet_qrcode = (_this,params) =>{return Request(_this,`${base}paper/get_qrcode`,params)}//15、获取试卷二维码
export const questionGetType = (_this,params) =>{return Request(_this,`${base}question/get_type`,params)}//16、获取题目类型

//设置接口

//1.获取用户角色全部权限信息
export const authGetAll = (_this,params) =>{return Request(_this,`${base}auth/get_all`,params)}
//2.修改角色权限
export const authUpdate = (_this,params) =>{return Request(_this,`${base}auth/update`,params)}

//数据字典部分
//1.获取数据字典信息
export const kvGetAll = (_this,params) =>{return Request(_this,`${base}kv/get_all`,params)}
//2.新增或修改数据字典
export const kvAction = (_this,params) =>{return Request(_this,`${base}kv/action`,params)}
//5.删除数据字典模块
export const kvDelete = (_this,params) =>{return Request(_this,`${base}kv/delete`,params)}
//3.获取字段关联信息
export const kvGetRefAll = (_this,params) =>{return Request(_this,`${base}kv/get_ref_all`,params)}
//4.修改字段关联信息
export const kvUpdateRef = (_this,params) =>{return Request(_this,`${base}kv/update_ref`,params)}



//1.新增或修改学校信息
export const schoolAction = (_this,params) =>{return Request(_this,`${base}school/action`,params)}
//2.获取全部学校信息
export const schoolGetAll = (_this,params) =>{return Request(_this,`${base}school/get_all`,params)}

//省市区部分接口
export const otherGetRegion = (_this,params) =>{return Request(_this,`${base}other/get_region`,params)}
export const otherRegionAction = (_this,params) =>{return Request(_this,`${base}other/region_action`,params)}